package com.vortex.cloud.zhsw.xinyang.service;

import com.vortex.cloud.lbs.enums.CoordtypeEnum;
import com.vortex.cloud.lbs.enums.ShapeTypeEnum;
import com.vortex.cloud.zhsw.xinyang.util.ExcelImportValidate;
import com.vortex.cloud.vfs.lite.base.dto.AbstractBaseDTO;
import com.vortex.cloud.vfs.lite.base.dto.excel.ExcelReadDTO;
import org.springframework.web.multipart.MultipartFile;

import java.beans.IntrospectionException;

/**
 * ZIP导入Service
 *
 * @author huohao@vortexinfo.cn
 * @date 2022/3/15 9:48
 */
public interface ZipImportService {
    /**
     * 读取Zip数据
     *
     * @param file                 Excel文件
     * @param clazz                读取的类型DTO
     * @param startRowNum          开始行
     * @param validateAndTransform 验证和信息（主要验证必填、格式、字典名称是否存在对应值、验重复，对于字典值将名称反写到对应字段）
     * @param coordtypeEnum        经纬度类型 {@link CoordtypeEnum}
     * @param shapeTypeEnum        图形类型{@link ShapeTypeEnum}
     * @return com.vortex.cloud.vfs.lite.base.dto.excel.ExcelReadDTO<DTO>
     * @throws IntrospectionException 异常信息
     * @author huohao@vortexinfo.cn
     */
    <DTO extends AbstractBaseDTO<DTO>> ExcelReadDTO<DTO> readZip(MultipartFile file, Class<DTO> clazz, Integer startRowNum, ExcelImportValidate<DTO> validateAndTransform, CoordtypeEnum coordtypeEnum, ShapeTypeEnum shapeTypeEnum) throws IntrospectionException;
}
